Skip to content

Adds guide on using Git in Positron#94

Merged
samclark2015 merged 9 commits intomainfrom
git-guide
Jul 8, 2025
Merged

Adds guide on using Git in Positron#94
samclark2015 merged 9 commits intomainfrom
git-guide

Conversation

@samclark2015
Copy link
Copy Markdown
Contributor

Addresses #7543

@netlify
Copy link
Copy Markdown

netlify bot commented Jun 23, 2025

Deploy Preview for positron-posit-co ready!

Name Link
🔨 Latest commit 6565637
🔍 Latest deploy log https://app.netlify.com/projects/positron-posit-co/deploys/686d7b087674910008b63777
😎 Deploy Preview https://deploy-preview-94--positron-posit-co.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@juliasilge juliasilge requested a review from jennybc June 23, 2025 19:32
Copy link
Copy Markdown
Collaborator

@juliasilge juliasilge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should mention in here that we bundle the GitHub Pull Requests extension (linking to the section on the extensions page that talks about bootstrap installation).

We should also mention that we don't bundle anything for integrating with alternative services like GitLab but that folks can install extensions for those services themselves.

jennybc
jennybc previously approved these changes Jun 24, 2025
Copy link
Copy Markdown
Member

@jennybc jennybc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall I think this is a great start and give my blessing to merge even if you don't take all of my suggestions.

I think one theme that runs through several of my comments is that sort of reads as if Git usage and GitHub usage are one and the same. I realize it's hard to cover both and convey the relationship. I'm talking about the fact that remote usage is optional but highly recommended for maximum benefit. And that GitHub is hardly the only remote host, but it's obviously the most likely.

Perhaps one well-crafted paragraph early on that describes the situation will reduce the need to put lots of caveats on things later.

- **Open Folder** to use an existing Git repository
- **New Folder** to create a new folder, with the option to initialize it as a Git repository
- **New from Git** to clone an existing Git repository from a remote source like GitHub

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does Positron / VS Code offer a way to git init in the current workspace if it's not already a git repo? If you're in an RStudio Project, you can go to Tools > Project Options … > Git/SVN. Under “Version control system”, select “Git” and confirm. I realize it's not that hard to do git init in a terminal, I'm just thinking we should be completist here and include such a gesture if it exists.

git.qmd Outdated
1. **Make changes** to your files in Positron
2. **Stage changes** by selecting which files to include in your next commit
3. **Commit changes** with a descriptive message about what you changed
4. **Push changes** to share them with others
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe it should be clear this is optional, i.e. only applies when you've got a remote set up.


Before you can use Git in Positron, you need to have Git installed on your computer. If Git is not installed, the Source Control view will show instructions on how to install it.

**Learn more:** [Set up Git in VS Code](https://code.visualstudio.com/docs/sourcecontrol/intro-to-git#_set-up-git-in-vs-code)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It feels like we might be missing an analogous instruction or link for getting setup with GitHub. I'm thinking about storing Git credentials, such as a PAT or SSH. I.e. the stuff that's going to make the GitHub flows described below actually light up.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you think about linking out to these docs, too?
https://code.visualstudio.com/docs/sourcecontrol/github

Copy link
Copy Markdown
Collaborator

@juliasilge juliasilge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Especially relevant for the links at the end, for style guide and accessibility reasons, we need to use the "real" titles for the links, i.e.:

- [Happy Git and GitHub for the useR](https://happygitwithr.com/) - A guide for R users to learn Git and GitHub

Adds git init instructions
Updates link text
Co-authored-by: Jennifer (Jenny) Bryan <jenny.f.bryan@gmail.com>
Copy link
Copy Markdown
Collaborator

@juliasilge juliasilge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good!

I think this feedback from me earlier may have fallen through the cracks:

We should mention in here that we bundle the GitHub Pull Requests extension (linking to the section on the extensions page that talks about bootstrap installation).

We should also mention that we don't bundle anything for integrating with alternative services like GitLab but that folks can install extensions for those services themselves.

Co-authored-by: Julia Silge <julia.silge@gmail.com>
@samclark2015 samclark2015 requested a review from juliasilge July 8, 2025 15:02
jennybc
jennybc previously approved these changes Jul 8, 2025
juliasilge
juliasilge previously approved these changes Jul 8, 2025
Copy link
Copy Markdown
Collaborator

@juliasilge juliasilge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One more change! Thank you so much 🙌

@samclark2015 samclark2015 dismissed stale reviews from juliasilge and jennybc via 6565637 July 8, 2025 20:09
Co-authored-by: Julia Silge <julia.silge@gmail.com>
@samclark2015 samclark2015 merged commit b975bfe into main Jul 8, 2025
5 checks passed
@samclark2015 samclark2015 deleted the git-guide branch July 8, 2025 20:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants